Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Obs AI Assistant] Avoid showing error toast when action is aborted b… #195331

Merged

Conversation

viduni94
Copy link
Contributor

@viduni94 viduni94 commented Oct 7, 2024

Closes #186794

Summary

Problem

When the user clicks on "Stop generating" while the AI Assistant is generating an answer, an error toast is shown with the error message "Aborted". This is unnecessary as the user knows they aborted their action.

Solution

Do not show an error toast if the action is aborted by the user.

@viduni94 viduni94 added release_note:fix v9.0.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:Obs AI Assistant Observability AI Assistant labels Oct 7, 2024
@viduni94 viduni94 self-assigned this Oct 7, 2024
@viduni94 viduni94 requested a review from a team as a code owner October 7, 2024 22:38
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Oct 7, 2024
@viduni94 viduni94 force-pushed the avoid-showing-error-toast-on-stop-generating branch from 0c18eb1 to 3eb2372 Compare October 7, 2024 22:39
@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 7, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 3eb2372
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-195331-3eb23721a294

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #9 / ColumnsPopover renders correctly a list of selected columns
  • [job] [logs] Jest Tests #5 / query tab with unified timeline Leading actions - notes securitySolutionNotesEnabled = true should have the notification dot & correct tooltip

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
observabilityAIAssistant 46.1KB 46.1KB +2.0B

History

cc @viduni94

@viduni94 viduni94 merged commit 43a3d4a into elastic:main Oct 8, 2024
25 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11235277597

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 8, 2024
elastic#195331)

Closes elastic#186794

## Summary

### Problem
When the user clicks on "Stop generating" while the AI Assistant is
generating an answer, an error toast is shown with the error message
"Aborted". This is unnecessary as the user knows they aborted their
action.

### Solution
Do not show an error toast if the action is aborted by the user.

(cherry picked from commit 43a3d4a)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 8, 2024
…rted b… (#195331) (#195396)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Obs AI Assistant] Avoid showing error toast when action is aborted
b… (#195331)](#195331)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-08T12:20:38Z","message":"[Obs
AI Assistant] Avoid showing error toast when action is aborted b…
(#195331)\n\nCloses
https://github.com/elastic/kibana/issues/186794\r\n\r\n##
Summary\r\n\r\n### Problem\r\nWhen the user clicks on \"Stop
generating\" while the AI Assistant is\r\ngenerating an answer, an error
toast is shown with the error message\r\n\"Aborted\". This is
unnecessary as the user knows they aborted their\r\naction.\r\n\r\n###
Solution\r\nDo not show an error toast if the action is aborted by the
user.","sha":"43a3d4a68ada67a584686b223ea8d798f4018cde","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-minor","Team:Obs
AI Assistant","ci:project-deploy-observability"],"title":"[Obs AI
Assistant] Avoid showing error toast when action is aborted
b…","number":195331,"url":"https://github.com/elastic/kibana/pull/195331","mergeCommit":{"message":"[Obs
AI Assistant] Avoid showing error toast when action is aborted b…
(#195331)\n\nCloses
https://github.com/elastic/kibana/issues/186794\r\n\r\n##
Summary\r\n\r\n### Problem\r\nWhen the user clicks on \"Stop
generating\" while the AI Assistant is\r\ngenerating an answer, an error
toast is shown with the error message\r\n\"Aborted\". This is
unnecessary as the user knows they aborted their\r\naction.\r\n\r\n###
Solution\r\nDo not show an error toast if the action is aborted by the
user.","sha":"43a3d4a68ada67a584686b223ea8d798f4018cde"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195331","number":195331,"mergeCommit":{"message":"[Obs
AI Assistant] Avoid showing error toast when action is aborted b…
(#195331)\n\nCloses
https://github.com/elastic/kibana/issues/186794\r\n\r\n##
Summary\r\n\r\n### Problem\r\nWhen the user clicks on \"Stop
generating\" while the AI Assistant is\r\ngenerating an answer, an error
toast is shown with the error message\r\n\"Aborted\". This is
unnecessary as the user knows they aborted their\r\naction.\r\n\r\n###
Solution\r\nDo not show an error toast if the action is aborted by the
user.","sha":"43a3d4a68ada67a584686b223ea8d798f4018cde"}}]}] BACKPORT-->

Co-authored-by: Viduni Wickramarachchi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project release_note:fix Team:Obs AI Assistant Observability AI Assistant v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Observability AI Assistant] "Stop generating" shows an error toast
4 participants